{
  "properties" : { },
  "id" : "07659c3652034c86b4f0e47953014b1a",
  "script" : null,
  "groupId" : "45ed0195567a4d9db69b9921a3ccfdb3",
  "name" : "签名",
  "createTime" : null,
  "updateTime" : 1733235313291,
  "lock" : null,
  "createBy" : null,
  "updateBy" : null,
  "path" : "sign",
  "description" : null,
  "returnType" : null,
  "mappingPath" : null,
  "parameters" : [ {
    "name" : "params",
    "value" : null,
    "description" : null,
    "required" : false,
    "dataType" : "String",
    "type" : null,
    "defaultValue" : null,
    "validateType" : null,
    "error" : null,
    "expression" : null,
    "children" : null
  } ]
}
================================
//  import cn.hutool.core.util.DigestUtil;
//  import log;


//  var newMap = {
//      pid: params.pid,
//      type: params.type,
//      out_trade_no: params.outTradeNo,
//      notify_url: params.notifyUrl,
//      return_url: params.return_url,
//      name: params.name,
//      money: params.money,
//  }

//  log.info("newMap-->" + newMap)


//  //根据key升序排序
//  sign = sortByKey(sign);

//  String signStr = "";

//  //遍历map 转成字符串
//  for (Map.Entry < String, String > m: sign.entrySet()) {
//      signStr += m.getKey() + "=" + m.getValue() + "&";
//  }

//  //去掉最后一个 &
//  signStr = signStr.substring(0, signStr.length() - 1);

//  //最后拼接上KEY
//  signStr += key;

//  //转为MD5
//  signStr = DigestUtils.md5DigestAsHex(signStr.getBytes());

//  sign.put("sign_type", signType);
//  sign.put("sign", signStr);


//  public static < K extends Comparable < ? super K > , V > Map < K, V > sortByKey(Map < K, V > map) {
//      Map < K, V > result = new LinkedHashMap < > ();

//      map.entrySet().stream()
//          .sorted(Map.Entry. < K, V > comparingByKey()).forEachOrdered(e -> result.put(e.getKey(), e.getValue()));
//      return result;
//  }


